function SafeCall(func, payload) {
    if (func != null && typeof func == "function") {
        if (payload != null) {
            func(payload)
        } else func()
    }
}

export default function (func, payload, callback) {
    SafeCall(func, payload)
    SafeCall(callback)
}